/**
 * Created by Administrator on 2017/10/17.
 */
var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;

var schema = new Schema({
    commentCount:Number,
    categoryId:ObjectId,
    title:String,
    releaseTime:{type: Date, default: Date.now },
    content:String,
    author:String,
    img:{},
})

schema.plugin(mongoosePaginate);
var News=mongoose.model('News',schema,'news');
module.exports=News;
